package com.taotao.test2.controller;

import com.taotao.test2.config.SensitiveWordFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangjin
 * @date 2023年12月01日 16:08
 */
@RestController
public class YourController {

    @Autowired
    private SensitiveWordFilter sensitiveWordFilter;

    @PostMapping("/filter")
    public String filterSensitiveWords(@RequestBody String input) {
        String filteredText =sensitiveWordFilter.filterSensitiveWords(input);
        return  filteredText;
    }
}
